package com.gpslw.mvc.enums;

public enum Level {
    HIGH(0, "高级"),
    LOW(1, "低级")
    ;

    Level(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private Integer code;

    private String desc;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static boolean isValid(Integer code){
        Level[] values = Level.values();
        for (Level value : values) {
            if (value.getCode().equals(code)){
                return true;
            }
        }
        return false;
    }
}
